package com.example.smartstart.entity;

import com.baomidou.mybatisplus.annotation.*;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.*;
import org.hibernate.validator.constraints.URL;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author dlx
 * @since 2024-07-22
 */
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@ToString
@TableName("award")
public class Award implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 奖品名称
     */
    @NotEmpty
    @Pattern(regexp = "^\\S{1,10}$")
    private String awardName;

    /**
     * 库存数量
     */
    private Integer inventory;

    /**
     * 消耗积分数
     */
    private Integer usePoints;

    /**
     * 奖品上架状态
     */
    @NotEmpty
    private String status;

    /**
     * 奖品图片URL
     */
    @URL
    private String photo;

    /**
     * 奖品类型
     */
    @NotEmpty
    private String type;

    /**
     * 奖品备注
     */
    private String content;

    @TableField(insertStrategy = FieldStrategy.NEVER,updateStrategy = FieldStrategy.NEVER,exist = false)
    private Integer offset;
    @TableField(insertStrategy = FieldStrategy.NEVER,updateStrategy = FieldStrategy.NEVER,exist = false)
    private Integer pageSize;

}
